<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- /fasttmp/mkdist-qt-4.3.5-1211793125/qtopia-core-opensource-src-4.3.5/src/network/qabstractsocket.cpp -->
<head>
  <title>Qt 4.3: Qt 3 Support Members for QAbstractSocket</title>
  <link href="classic.css" rel="stylesheet" type="text/css" />
</head>
<body>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="left" valign="top" width="32"><a href="http://www.trolltech.com/products/qt"><img src="images/qt-logo.png" align="left" width="32" height="32" border="0" /></a></td>
<td width="1">&nbsp;&nbsp;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&nbsp;&middot; <a href="classes.html"><font color="#004faf">All&nbsp;Classes</font></a>&nbsp;&middot; <a href="mainclasses.html"><font color="#004faf">Main&nbsp;Classes</font></a>&nbsp;&middot; <a href="groups.html"><font color="#004faf">Grouped&nbsp;Classes</font></a>&nbsp;&middot; <a href="modules.html"><font color="#004faf">Modules</font></a>&nbsp;&middot; <a href="functions.html"><font color="#004faf">Functions</font></a></td>
<td align="right" valign="top" width="230"><a href="http://www.trolltech.com"><img src="images/trolltech-logo.png" align="right" width="203" height="32" border="0" /></a></td></tr></table><h1 align="center">Qt 3 Support Members for QAbstractSocket</h1>
<p><b>The following class members are part of the <a href="qt3support.html">Qt 3 support layer</a>.</b> They are provided to help you port old code to Qt 4. We advise against using them in new code.</p>
<p><ul><li><a href="qabstractsocket.html">QAbstractSocket class reference</a></li></ul></p>
<h3>Public Types</h3>
<ul>
<li><div class="fn"/>enum <b><a href="qabstractsocket-qt3.html#Error-enum">Error</a></b> { ErrConnectionRefused, ErrHostNotFound, ErrSocketRead }</li>
<li><div class="fn"/>typedef <b><a href="qabstractsocket-qt3.html#State-typedef">State</a></b></li>
</ul>
<h3>Public Functions</h3>
<ul>
<li><div class="fn"/>void <b><a href="qabstractsocket-qt3.html#setSocket">setSocket</a></b> ( int <i>socket</i> )</li>
<li><div class="fn"/>int <b><a href="qabstractsocket-qt3.html#socket">socket</a></b> () const</li>
<li><div class="fn"/>qulonglong <b><a href="qabstractsocket-qt3.html#waitForMore">waitForMore</a></b> ( int <i>msecs</i>, bool * <i>timeout</i> = 0 ) const</li>
</ul>
<ul>
<li><div class="fn"/>22 public functions inherited from <a href="qiodevice.html#public-functions">QIODevice</a></li>
<li><div class="fn"/>8 public functions inherited from <a href="qobject.html#public-functions">QObject</a></li>
</ul>
<h3>Signals</h3>
<ul>
<li><div class="fn"/>void <b><a href="qabstractsocket-qt3.html#connectionClosed">connectionClosed</a></b> ()</li>
<li><div class="fn"/>void <b><a href="qabstractsocket-qt3.html#delayedCloseFinished">delayedCloseFinished</a></b> ()</li>
</ul>
<hr />
<h2>Member Type Documentation</h2>
<h3 class="fn"><a name="Error-enum"></a>enum QAbstractSocket::Error</h3>
<p>Use <a href="qabstractsocket.html#SocketError-enum">QAbstractSocket::SocketError</a> instead.</p>
<p><table border="1" cellpadding="2" cellspacing="1" width="100%">
<tr><th width="25%">Constant</th><th width="15%">Value</th><th width="60%">Description</th></tr>
<tr><td valign="top"><tt>QAbstractSocket::ErrConnectionRefused</tt></td><td align="center" valign="top"><tt>ConnectionRefusedError</tt></td><td valign="top">Use <a href="qabstractsocket.html#SocketError-enum">QAbstractSocket::ConnectionRefusedError</a> instead.</td></tr>
<tr><td valign="top"><tt>QAbstractSocket::ErrHostNotFound</tt></td><td align="center" valign="top"><tt>HostNotFoundError</tt></td><td valign="top">Use <a href="qabstractsocket.html#SocketError-enum">QAbstractSocket::HostNotFoundError</a> instead.</td></tr>
<tr><td valign="top"><tt>QAbstractSocket::ErrSocketRead</tt></td><td align="center" valign="top"><tt>UnknownSocketError</tt></td><td valign="top">Use <a href="qabstractsocket.html#SocketError-enum">QAbstractSocket::UnknownSocketError</a> instead.</td></tr>
</table></p>
<h3 class="fn"><a name="State-typedef"></a>typedef QAbstractSocket::State</h3>
<p>Use <a href="qabstractsocket.html#SocketState-enum">QAbstractSocket::SocketState</a> instead.</p>
<p><table align="center" cellpadding="2" cellspacing="1" border="0">
<thead><tr valign="top" class="qt-style"><th>Qt 3 enum value</th><th>Qt 4 enum value</th></tr></thead>
<tr valign="top" class="odd"><td><tt>Idle</tt></td><td><a href="qabstractsocket.html#SocketState-enum">UnconnectedState</a></td></tr>
<tr valign="top" class="even"><td><tt>HostLookup</tt></td><td><a href="qabstractsocket.html#SocketState-enum">HostLookupState</a></td></tr>
<tr valign="top" class="odd"><td><tt>Connecting</tt></td><td><a href="qabstractsocket.html#SocketState-enum">ConnectingState</a></td></tr>
<tr valign="top" class="even"><td><tt>Connected</tt></td><td><a href="qabstractsocket.html#SocketState-enum">ConnectedState</a></td></tr>
<tr valign="top" class="odd"><td><tt>Closing</tt></td><td><a href="qabstractsocket.html#SocketState-enum">ClosingState</a></td></tr>
<tr valign="top" class="even"><td><tt>Connection</tt></td><td><a href="qabstractsocket.html#SocketState-enum">ConnectedState</a></td></tr>
</table></p>
<hr />
<h2>Member Function Documentation</h2>
<h3 class="fn"><a name="connectionClosed"></a>void QAbstractSocket::connectionClosed ()&nbsp;&nbsp;<tt> [signal]</tt></h3>
<p>Use closed() instead.</p>
<h3 class="fn"><a name="delayedCloseFinished"></a>void QAbstractSocket::delayedCloseFinished ()&nbsp;&nbsp;<tt> [signal]</tt></h3>
<p>Use closed() instead.</p>
<h3 class="fn"><a name="setSocket"></a>void QAbstractSocket::setSocket ( int <i>socket</i> )</h3>
<p>Use <a href="qabstractsocket.html#setSocketDescriptor">setSocketDescriptor</a>() instead.</p>
<p>See also <a href="qabstractsocket-qt3.html#socket">socket</a>().</p>
<h3 class="fn"><a name="socket"></a>int QAbstractSocket::socket () const</h3>
<p>Use <a href="qabstractsocket.html#socketDescriptor">socketDescriptor</a>() instead.</p>
<p>See also <a href="qabstractsocket-qt3.html#setSocket">setSocket</a>().</p>
<h3 class="fn"><a name="waitForMore"></a><a href="qtglobal.html#qulonglong-typedef">qulonglong</a> QAbstractSocket::waitForMore ( int <i>msecs</i>, bool * <i>timeout</i> = 0 ) const</h3>
<p>Use <a href="qabstractsocket.html#waitForReadyRead">waitForReadyRead</a>() instead.</p>
<p>For example, if you have code like</p>
<pre><font color="#404040"> bool timeout;
 Q_ULONG numBytes = socket-&gt;waitForMore(30000, &amp;timeout);</font></pre>
<p>you can rewrite it as</p>
<pre> qint64 numBytes = 0;
 if (socket-&gt;waitForReadyRead(msecs))
     numBytes = socket-&gt;bytesAvailable();
 bool timeout = (error() == QAbstractSocket::SocketTimeoutError);</pre>
<p>See also <a href="qabstractsocket.html#waitForReadyRead">waitForReadyRead</a>(), <a href="qabstractsocket.html#bytesAvailable">bytesAvailable</a>(), <a href="qabstractsocket.html#error">error</a>(), and <a href="qabstractsocket.html#SocketError-enum">SocketTimeoutError</a>.</p>
<p /><address><hr /><div align="center">
<table width="100%" cellspacing="0" border="0"><tr class="address">
<td width="30%">Copyright &copy; 2008 <a href="trolltech.html">Trolltech</a></td>
<td width="40%" align="center"><a href="trademarks.html">Trademarks</a></td>
<td width="30%" align="right"><div align="right">Qt 4.3.5</div></td>
</tr></table></div></address></body>
</html>
